/*
	conditionLanguage/variable.h
	@author:Wolfhead
*/
#ifndef WOLV_CONDITION_LANGUAGE_VARIABLE_H
#define WOLV_CONDITION_LANGUAGE_VARIABLE_H

#include <string>

#include "common/weakType/weak_type_value.h"




namespace wolv
{
namespace condition
{

typedef wolv::weakType::Value VariableValue;

class LocalContext;

class Variable
{
public:
	Variable();
	Variable(const std::string& name);
	Variable(const VariableValue& value);

	void SetConext(LocalContext* pContext);

	bool operator == (const Variable& value);
	bool operator != (const Variable& value);
	bool operator < (const Variable& value);
	bool operator <= (const Variable& value);
	bool operator > (const Variable& value);
	bool operator >= (const Variable& value);
	bool in(const Variable& value);

private:

	int _Load() const;

	mutable VariableValue value_;
	std::string name_;
	mutable bool loaded_;
	LocalContext* pContext_;
};



}//namespace condition
}//namespace wolv




#endif

